<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>离线访问 - Taro打印</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f8f9fa;
      color: #333;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      text-align: center;
    }
    
    .offline-container {
      max-width: 600px;
      padding: 2rem;
      background-color: white;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      border-radius: 8px;
      margin: 1rem;
    }
    
    h1 {
      color: #1976d2;
      margin-bottom: 1rem;
    }
    
    p {
      line-height: 1.6;
      margin-bottom: 1.5rem;
    }
    
    .icon {
      display: block;
      width: 80px;
      height: 80px;
      margin: 0 auto 2rem;
      background-color: #f5f5f5;
      border-radius: 50%;
      padding: 1rem;
      box-sizing: content-box;
    }
    
    .icon svg {
      width: 100%;
      height: 100%;
      fill: #1976d2;
    }
    
    .btn {
      display: inline-block;
      background-color: #1976d2;
      color: white;
      text-decoration: none;
      padding: 0.8rem 1.5rem;
      border-radius: 4px;
      font-weight: bold;
      margin-top: 1rem;
      transition: background-color 0.3s;
    }
    
    .btn:hover {
      background-color: #1565c0;
    }
    
    .tips {
      margin-top: 2rem;
      padding: 1rem;
      background-color: #e8f5e9;
      border-radius: 4px;
      border-left: 4px solid #4caf50;
    }
    
    .tips h3 {
      margin-top: 0;
      color: #2e7d32;
    }
    
    .tips ul {
      text-align: left;
      padding-left: 1.5rem;
    }
    
    .tips li {
      margin-bottom: 0.5rem;
    }
    
    @media (max-width: 480px) {
      .offline-container {
        padding: 1.5rem;
      }
      
      h1 {
        font-size: 1.5rem;
      }
    }
  </style>
</head>
<body>
  <div class="offline-container">
    <div class="icon">
      <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
        <path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.4 0-8-3.6-8-8 0-1.7.5-3.3 1.5-4.6l11.1 11.1c-1.3 1-2.9 1.5-4.6 1.5zm6.5-3.4L7.4 5.5C8.7 4.5 10.3 4 12 4c4.4 0 8 3.6 8 8 0 1.7-.5 3.3-1.5 4.6z"/>
      </svg>
    </div>
    
    <h1>您当前处于离线状态</h1>
    <p>无法连接到互联网。请检查您的网络连接并重试。</p>
    
    <p>由于您之前访问过我们的应用，部分功能可以离线使用。</p>
    
    <a href="/" class="btn">刷新页面</a>
    
    <div class="tips">
      <h3>离线功能提示</h3>
      <ul>
        <li>已缓存的图像可以继续查看</li>
        <li>部分基本的打印设置可以继续使用</li>
        <li>需要联网才能搜索设备和执行打印</li>
        <li>恢复网络连接后所有功能将自动可用</li>
      </ul>
    </div>
  </div>
  
  <script>
    // 检测网络状态变化
    window.addEventListener('online', function() {
      window.location.reload();
    });
    
    // 检查按钮点击
    document.querySelector('.btn').addEventListener('click', function(e) {
      e.preventDefault();
      window.location.reload();
    });
  </script>
</body>
</html> 